package com.yanfan.energy.domain.enums;

/**
 * 用户状态
 *
 * @author ruoyi
 */
public enum BillTypeEnums {
    WORK_ORDER(0, "工单"), TASK(1, "任务");

    private final Integer code;
    private final String desc;

    BillTypeEnums(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getEnumByType(Integer type) {
        for (BillTypeEnums item : BillTypeEnums.values()) {
            if (item.getCode().equals(type)) {
                return item.getDesc();
            }
        }

        return "";
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
